package annotation.immutable

@Immutable class Coordinates {
	Double latitude, longitude

	def print() {
		println "latitude:${latitude} longitude:${longitude}"
	}
}

def c1 = new Coordinates(latitude: 48.824068, longitude: 2.531733)
c1.print();

// 例外スロー
c1.latitude = 50.0123456789
c1.print()

